package org.czl.leetcode4;

public class l1359 {
    static int MOD = 1_000_000_007;

    public static void main(String[] args) {
        System.out.println(countOrders(2));
    }
    public static int countOrders(int n) {
        long ans = 1;
        for(int i = 2; i <= n; i++){
            long a = (2L * (i - 1)) + 1;
            long b = (a * (a  - 1))/2 + a;
            ans = (b + ans) % MOD;
        }
        return (int)ans;
    }
}
